Fruit Flies

Using the R package suggested by Mads, DiscoRhythm, we performed our analysis on the data provided. We first formatted the data for the package. We named the samples in terms of Circular time, which was two replicates of two 24 hour cycles. We got rid of the “pool - pool” group and did some cleaning so that the replicates all had the same respective treatment names. Those were:

We then performed three separate tests for each treatment with the three time phases given: 8, 12, and 24 hours. Those test were the Cosinor (CS), JTK Cycle (JTK), and the Lomb-Scargle (LS), all performed through DiscoRhythm. The results provided the metabolites with significant cycles for that chosen period.

Our results found two main things:

To display these findings, we presented tables for the the metabolites with the 20 smallest p-values. These q-values presented in these tables are the adjusted p-values using the Benjamini-Hochberg procedure.

In addition to the tables, we used Manhattan plots to visually display the p-values (the red line on each plot is the Bonferroni-adjusted significance level, which is an extremely conservative cut-off).

We then took the metabolites that did have significant cycles, and created graphs of the metabolites versus time to see what those cycles look like.

library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.4     ✔ readr     2.1.5
## ✔ forcats   1.0.0     ✔ stringr   1.5.1
## ✔ ggplot2   3.5.1     ✔ tibble    3.2.1
## ✔ lubridate 1.9.3     ✔ tidyr     1.3.1
## ✔ purrr     1.0.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(DiscoRhythm)
test <- as.data.frame(t(read.csv("./MX7590~2(data)_clean_greg.csv", header = FALSE)))
names(test) <- test[1,]
test <- test[-1,]

#table(test$treatment)

#Converting to numeric
test[,9:ncol(test)] <- apply(test[,9:ncol(test)],2,as.numeric)

test <- test %>% filter(treatment != "pool - pool")
test <- 
  test %>% mutate(
    replicate = substr(treatment, nchar(treatment), nchar(treatment)),
    trt = substr(treatment, 1, nchar(treatment) - 4),
    index = 1:192,
    time = rep(seq(0, 46, 2), 8),
    c_time = rep(seq(0, 22, 2), 16),
    day = rep(rep(c(1, 2), each = 12), 8)
  )
test$trt[test$trt == "clock856"] <- "clk856"
names(test) <- gsub(" ", "", names(test))
#clk856, iso, to, trf
for (t in c("clk856", "iso", "to", "trf")){
  for (p in c(8, 12, 24)){
    
disco_sub <-
  test %>% filter(trt == t) %>% mutate(discoID = paste0("CT", c_time, "_", index, "_", replicate)) %>% select(c(9:584, 590))
t_disco_sub <- as.data.frame(t(disco_sub[, -ncol(disco_sub)]))
names(t_disco_sub) <- test %>% filter(trt == t) %>% mutate(discoID = paste0("CT", c_time, "_", index, "_", replicate)) %>% pull(discoID)
t_disco_sub$IDs <- row.names(t_disco_sub)
t_disco_sub <- t_disco_sub %>% relocate(IDs)
indata <- t_disco_sub

#Converting dfrom DF to SE object.
se <- discoDFtoSE(indata)

#Check input 
selectDataSE <- discoCheckInput(se)

results <- discoODAs(selectDataSE,
                         period=p,
                         method=c("JTK","CS", "LS"),
                         ncores=1,
                         circular_t=TRUE)



plot(-log(sort(results$JTK$pvalue)), ylim = c(0,15), main = paste("Treatment:  ",t," - Period: ", p, " - Test: JTK"), ylab = "-log(p-value)")
abline(h = -log(0.05/length(results$JTK$pvalue)), col = "red")

plot(-log(sort(results$CS$pvalue)), ylim = c(0,15), main = paste("Treatment:  ",t," - Period: ", p, " - Test: CS"), ylab = "-log(p-value)")
abline(h = -log(0.05/length(results$CS$pvalue)), col = "red")

plot(-log(sort(results$LS$pvalue)), ylim = c(0,15), main = paste("Treatment:  ",t," - Period: ", p, " - Test: LS"), ylab = "-log(p-value)")
abline(h = -log(0.05/length(results$LS$pvalue)), col = "red")


print("JTK smallest p-values")

knitr::kable(results$JTK %>% arrange(pvalue) %>% head(20), format = "markdown") %>% print()

print("CS smallest p-values")

knitr::kable(results$CS %>% select(1:4) %>% arrange(pvalue) %>% head(20), format = "markdown") %>% print()

print("LS smallest p-values")

knitr::kable(results$LS %>% arrange(pvalue) %>% head(20), format = "markdown") %>% print()



}
}

## [1] "JTK smallest p-values"
## 
## 
## |                    | acrophase|  amplitude|    pvalue| qvalue| period|
## |:-------------------|---------:|----------:|---------:|------:|------:|
## |117986              |         4|  1778.5503| 0.0049075|      1|      8|
## |121476              |         5|   266.5793| 0.0134625|      1|      8|
## |65017               |         4|  2460.3780| 0.0186430|      1|      8|
## |365909              |         6|   412.9504| 0.0227918|      1|      8|
## |histidine           |         5| 18115.3686| 0.0241219|      1|      8|
## |514158              |         5|   655.4880| 0.0269912|      1|      8|
## |tryptophan          |         5|  4546.6966| 0.0336532|      1|      8|
## |170319              |         0|   300.1668| 0.0336532|      1|      8|
## |106344              |         4|  1067.7312| 0.0355306|      1|      8|
## |351039              |         3|  3522.2757| 0.0374997|      1|      8|
## |N-acetylmannosamine |         6|   269.0541| 0.0428624|      1|      8|
## |377304              |         1|   129.0470| 0.0476146|      1|      8|
## |553346              |         3|   155.5635| 0.0615655|      1|      8|
## |320876              |         5|   218.8495| 0.0751641|      1|      8|
## |379895              |         0|   123.7437| 0.0789443|      1|      8|
## |indole-3-acetate    |         5|   336.5828| 0.0828874|      1|      8|
## |mannoheptulose      |         5|   277.8930| 0.0890976|      1|      8|
## |uracil              |         7|  2793.7789| 0.0980292|      1|      8|
## |241383              |         5|   253.4978| 0.0980292|      1|      8|
## |104131              |         4|  1624.5778| 0.1027755|      1|      8|
## [1] "CS smallest p-values"
## 
## 
## |                    | acrophase|  amplitude|    pvalue|    qvalue|
## |:-------------------|---------:|----------:|---------:|---------:|
## |117986              | 3.9608044|  2239.0609| 0.0033871| 0.9994387|
## |514158              | 4.0908388|  1119.3476| 0.0099947| 0.9994387|
## |351039              | 2.7700901|  4904.4172| 0.0129921| 0.9994387|
## |106344              | 3.8342893|  1634.1540| 0.0139345| 0.9994387|
## |377304              | 0.5575829|   228.9373| 0.0337072| 0.9994387|
## |121476              | 4.3405507|   414.7903| 0.0372585| 0.9994387|
## |phenol              | 0.1317250|  1170.0478| 0.0427905| 0.9994387|
## |pyrophosphate       | 7.7766770| 65410.4080| 0.0458140| 0.9994387|
## |65017               | 3.3934821|  3286.9314| 0.0485324| 0.9994387|
## |110328              | 0.6245086|  1210.2232| 0.0505389| 0.9994387|
## |campesterol         | 5.6190216|  7144.0149| 0.0508284| 0.9994387|
## |N-acetylmannosamine | 5.1323194|   312.1334| 0.0513269| 0.9994387|
## |241383              | 4.2189763|   508.1212| 0.0516580| 0.9994387|
## |553346              | 2.5785237|   251.1026| 0.0520328| 0.9994387|
## |170319              | 7.4477923|   346.0376| 0.0594115| 0.9994387|
## |104957              | 2.4175900|   963.2616| 0.0650795| 0.9994387|
## |histidine           | 4.3885915| 29102.4484| 0.0673772| 0.9994387|
## |146585              | 7.5780991|   722.6006| 0.0703408| 0.9994387|
## |62409               | 0.0289106|   890.0628| 0.0733217| 0.9994387|
## |131450              | 4.2843308|  5662.9493| 0.0849854| 0.9994387|
## [1] "LS smallest p-values"
## 
## 
## |                    | acrophase|  amplitude|    pvalue| qvalue| period|
## |:-------------------|---------:|----------:|---------:|------:|------:|
## |117986              | 4.0916443|   6835.039| 0.2435220|      1|      8|
## |514158              | 3.3488549|   7145.252| 0.4976778|      1|      8|
## |351039              | 0.5816402|  20337.892| 0.5782172|      1|      8|
## |106344              | 4.1500588|   8119.103| 0.6004721|      1|      8|
## |377304              | 2.0301353|   2405.441| 0.8671555|      1|      8|
## |121476              | 5.9999190|   3098.066| 0.8906415|      1|      8|
## |phenol              | 0.0328433|  10328.999| 0.9191919|      1|      8|
## |pyrophosphate       | 7.3977911| 626876.785| 0.9315018|      1|      8|
## |65017               | 6.1104177|  18207.234| 0.9409614|      1|      8|
## |110328              | 0.1319852|  10527.816| 0.9470971|      1|      8|
## |campesterol         | 4.2807700|  72550.151| 0.9479284|      1|      8|
## |N-acetylmannosamine | 4.1512747|   2222.239| 0.9493293|      1|      8|
## |241383              | 0.9036704|   4164.298| 0.9502387|      1|      8|
## |553346              | 2.0989285|   1259.943| 0.9512488|      1|      8|
## |170319              | 5.9314155|   2551.613| 0.9674602|      1|      8|
## |104957              | 1.9998024|   6840.423| 0.9761681|      1|      8|
## |histidine           | 1.5953091| 146670.273| 0.9790005|      1|      8|
## |146585              | 0.9142193|   6199.121| 0.9821671|      1|      8|
## |62409               | 2.3287742|  14741.902| 0.9848756|      1|      8|
## |131450              | 3.8098581|  74368.455| 0.9920887|      1|      8|

## [1] "JTK smallest p-values"
## 
## 
## |               | acrophase| amplitude|    pvalue|   qvalue| period|
## |:--------------|---------:|---------:|---------:|--------:|------:|
## |lignocericacid |         8| 1132.0780| 0.0032392| 0.852194|     12|
## |14730          |         9|  894.4901| 0.0039982| 0.852194|     12|
## |18256          |         9|  771.4535| 0.0044385| 0.852194|     12|
## |65238          |        10| 1041.2147| 0.0131392| 1.000000|     12|
## |84223          |         6| 3021.8208| 0.0178931| 1.000000|     12|
## |aconiticacid   |         9| 1906.0063| 0.0256091| 1.000000|     12|
## |84388          |         4| 1306.0262| 0.0263805| 1.000000|     12|
## |514150         |         4|  731.1484| 0.0304890| 1.000000|     12|
## |cerotinicacid  |         9|  224.5064| 0.0382811| 1.000000|     12|
## |553408         |         9|  806.8088| 0.0382811| 1.000000|     12|
## |111253         |         6| 1983.0810| 0.0382811| 1.000000|     12|
## |390130         |         2|  895.5507| 0.0428047| 1.000000|     12|
## |553269         |        10| 1889.7429| 0.0477961| 1.000000|     12|
## |399721         |         2|  288.8531| 0.0504798| 1.000000|     12|
## |110328         |        10|  972.2718| 0.0532958| 1.000000|     12|
## |106686         |         9|  752.8919| 0.0659943| 1.000000|     12|
## |20330          |         6| 1881.6111| 0.0812756| 1.000000|     12|
## |117998         |         3| 4473.1575| 0.0855476| 1.000000|     12|
## |62840          |         3| 9587.4841| 0.0900142| 1.000000|     12|
## |125882         |         8| 1946.6650| 0.0946823| 1.000000|     12|
## [1] "CS smallest p-values"
## 
## 
## |                   | acrophase|  amplitude|    pvalue|    qvalue|
## |:------------------|---------:|----------:|---------:|---------:|
## |14730              |  8.450995|   905.2258| 0.0006982| 0.4021716|
## |18256              |  8.500485|   784.1888| 0.0018754| 0.5401137|
## |lignocericacid     |  7.808949|  1257.7670| 0.0028190| 0.5412495|
## |84223              |  5.243923|  4322.0279| 0.0136198| 0.9989415|
## |390130             |  2.479778|  1146.9375| 0.0215574| 0.9989415|
## |84388              |  4.168673|  1326.3359| 0.0226772| 0.9989415|
## |cerotinicacid      |  8.329219|   308.8269| 0.0283023| 0.9989415|
## |65238              |  8.970528|  1151.6261| 0.0294271| 0.9989415|
## |111253             |  5.797932|  3089.5682| 0.0331619| 0.9989415|
## |553376             |  9.148002| 26179.9257| 0.0434108| 0.9989415|
## |514150             |  2.749142|   948.2022| 0.0439192| 0.9989415|
## |4-aminobutyricacid |  8.249401| 11846.0270| 0.0468851| 0.9989415|
## |1,2,4-benzenetriol |  9.550060|   542.3135| 0.0482633| 0.9989415|
## |126350             |  9.342701| 20172.7224| 0.0516183| 0.9989415|
## |342717             |  3.048404| 96118.4432| 0.0519009| 0.9989415|
## |30962              |  5.769866|  2568.1006| 0.0525163| 0.9989415|
## |62840              |  1.910602|  8483.6882| 0.0562506| 0.9989415|
## |87877              | 10.990157| 23854.9504| 0.0604296| 0.9989415|
## |26899              |  9.510716|   505.3903| 0.0612257| 0.9989415|
## |350847             | 11.069068|  2492.6797| 0.0630201| 0.9989415|
## [1] "LS smallest p-values"
## 
## 
## |                   |  acrophase|  amplitude|    pvalue| qvalue| period|
## |:------------------|----------:|----------:|---------:|------:|------:|
## |14730              |  8.3138173|   5615.438| 0.0776672|      1|     12|
## |18256              |  8.3701511|   5377.063| 0.1594376|      1|     12|
## |lignocericacid     |  8.0113774|   7780.238| 0.2137854|      1|     12|
## |84223              |  4.7456171|  32420.855| 0.5931879|      1|     12|
## |390130             |  2.6406326|   8675.745| 0.7401977|      1|     12|
## |84388              |  5.4491858|   6411.941| 0.7559067|      1|     12|
## |cerotinicacid      | 10.2142769|   2270.961| 0.8212063|      1|     12|
## |65238              | 10.1053291|   7566.159| 0.8319464|      1|     12|
## |111253             |  4.9064963|  20282.553| 0.8631223|      1|     12|
## |553376             |  9.8073807| 197444.979| 0.9218862|      1|     12|
## |514150             |  2.2432850|   8015.341| 0.9240269|      1|     12|
## |4-aminobutyricacid |  8.0232616|  57931.293| 0.9353977|      1|     12|
## |1,2,4-benzenetriol |  9.2337904|   2645.651| 0.9400863|      1|     12|
## |126350             | 10.1100419| 101537.122| 0.9501306|      1|     12|
## |342717             |  1.8316437| 506737.307| 0.9508957|      1|     12|
## |30962              |  5.4285551|  16125.932| 0.9525219|      1|     12|
## |62840              |  1.9264632|  78981.657| 0.9613023|      1|     12|
## |87877              | 11.1623208|  63104.304| 0.9692285|      1|     12|
## |26899              |  9.8587460|   5270.501| 0.9705445|      1|     12|
## |350847             |  0.1266452|  16232.920| 0.9733100|      1|     12|

## [1] "JTK smallest p-values"
## 
## 
## |                            | acrophase|   amplitude|    pvalue| qvalue| period|
## |:---------------------------|---------:|-----------:|---------:|------:|------:|
## |glucose                     |        14| 213871.1635| 0.0147226|      1|     24|
## |354256                      |        15|    517.0718| 0.0147226|      1|     24|
## |480021                      |        11|    434.5171| 0.0210632|      1|     24|
## |210229                      |        16|    212.8391| 0.0224509|      1|     24|
## |217691                      |        15|   6458.1830| 0.0279733|      1|     24|
## |18488                       |        13|   1178.5702| 0.0279733|      1|     24|
## |tagatose                    |        13|   2344.4125| 0.0357862|      1|     24|
## |aminomalonicacid            |        17|   3740.9484| 0.0357862|      1|     24|
## |16747                       |        15|   7546.5971| 0.0380242|      1|     24|
## |4219                        |        15|   2713.5223| 0.0380242|      1|     24|
## |474224                      |         3|  65270.5521| 0.0482909|      1|     24|
## |474135                      |         3|  60607.5364| 0.0482909|      1|     24|
## |222298                      |        15|   1036.6185| 0.0512183|      1|     24|
## |527023                      |        18|    678.8225| 0.0543037|      1|     24|
## |citrulline                  |        14|   7855.6028| 0.0575543|      1|     24|
## |4550                        |        18|   9647.5881| 0.0575543|      1|     24|
## |189391                      |        15|    261.2760| 0.0627801|      1|     24|
## |187855                      |        15|    729.7342| 0.0627801|      1|     24|
## |3-Aminopiperidine-2,6-dione |        19|   3613.4924| 0.0645822|      1|     24|
## |1-docosanol                 |        16|    429.9209| 0.0645822|      1|     24|
## [1] "CS smallest p-values"
## 
## 
## |                 | acrophase|  amplitude|    pvalue|    qvalue|
## |:----------------|---------:|----------:|---------:|---------:|
## |222298           | 14.410007|  1432.9249| 0.0057593| 0.6674312|
## |4219             | 14.194488|  3077.3675| 0.0069491| 0.6674312|
## |379063           | 17.219622|  1780.4416| 0.0076828| 0.6674312|
## |210229           | 14.850058|   295.9127| 0.0079556| 0.6674312|
## |18488            | 12.950271|  1173.6382| 0.0090144| 0.6674312|
## |16747            | 14.045778| 11041.9861| 0.0093705| 0.6674312|
## |17537            | 11.062843|   878.3176| 0.0103553| 0.6674312|
## |4550             | 17.007741|  9148.1711| 0.0121899| 0.6674312|
## |1-docosanol      | 16.240900|   476.2339| 0.0164550| 0.6674312|
## |189391           | 14.731576|   359.6343| 0.0170700| 0.6674312|
## |104933           | 13.394109|  3546.2902| 0.0173377| 0.6674312|
## |1771             | 16.796222|   544.0125| 0.0175568| 0.6674312|
## |320876           | 18.433396|   353.1520| 0.0176739| 0.6674312|
## |aminomalonicacid | 16.161535|  4208.6371| 0.0180061| 0.6674312|
## |527091           | 19.266612|   847.6074| 0.0184198| 0.6674312|
## |474224           |  1.762252| 77143.0933| 0.0185398| 0.6674312|
## |412156           |  9.933017|   315.5222| 0.0218689| 0.7409682|
## |474135           |  1.931885| 68581.6832| 0.0269694| 0.7762484|
## |125897           | 13.947191| 14661.5724| 0.0283548| 0.7762484|
## |1867             |  4.926583|  1337.2059| 0.0305439| 0.7762484|
## [1] "LS smallest p-values"
## 
## 
## |                 | acrophase|  amplitude|    pvalue| qvalue| period|
## |:----------------|---------:|----------:|---------:|------:|------:|
## |222298           | 13.595129|   7687.959| 0.3508564|      1|     24|
## |4219             | 13.812488|  11689.763| 0.3969245|      1|     24|
## |379063           | 17.117229|   8439.777| 0.4232774|      1|     24|
## |210229           | 14.091732|   2296.530| 0.4327124|      1|     24|
## |18488            | 12.138354|   8076.626| 0.4676109|      1|     24|
## |16747            | 14.129621|  73051.817| 0.4787696|      1|     24|
## |17537            | 10.188079|   6379.174| 0.5082365|      1|     24|
## |4550             | 16.603029|  82644.988| 0.5581884|      1|     24|
## |1-docosanol      | 12.146050|   2894.729| 0.6539461|      1|     24|
## |189391           | 12.383998|   2988.710| 0.6657864|      1|     24|
## |104933           | 12.540415|  21325.258| 0.6708052|      1|     24|
## |1771             | 17.258443|   4045.552| 0.6748532|      1|     24|
## |320876           | 18.957032|   4200.523| 0.6769934|      1|     24|
## |aminomalonicacid | 17.963673|  18506.452| 0.6829873|      1|     24|
## |527091           | 17.818706|   4355.431| 0.6902866|      1|     24|
## |474224           |  3.202457| 455724.440| 0.6923706|      1|     24|
## |412156           | 13.508391|   2366.413| 0.7446703|      1|     24|
## |474135           |  3.016576| 462162.276| 0.8075664|      1|     24|
## |125897           | 15.788896|  68813.965| 0.8217232|      1|     24|
## |1867             |  4.815662|  11414.723| 0.8419596|      1|     24|

## [1] "JTK smallest p-values"
## 
## 
## |                  | acrophase|  amplitude|    pvalue| qvalue| period|
## |:-----------------|---------:|----------:|---------:|------:|------:|
## |370221            |         4|  4046.4186| 0.0063728|      1|      8|
## |124996            |         1|  1709.4306| 0.0285364|      1|      8|
## |20281             |         6|  9652.1843| 0.0463712|      1|      8|
## |1-monopalmitin    |         7|   476.2364| 0.0514606|      1|      8|
## |65017             |         5|  1322.2897| 0.0514606|      1|      8|
## |437830            |         5|   662.5591| 0.0570318|      1|      8|
## |381422            |         0| 11466.4436| 0.0570318|      1|      8|
## |87877             |         6|  9829.1378| 0.0570318|      1|      8|
## |33282             |         5|  4772.0869| 0.0570318|      1|      8|
## |390130            |         0|   592.2019| 0.0733141|      1|      8|
## |189391            |         1|   184.9084| 0.0733141|      1|      8|
## |110328            |         1|   776.7568| 0.0733141|      1|      8|
## |351245            |         5|   103.0608| 0.0849004|      1|      8|
## |110321            |         0|   283.5498| 0.0849004|      1|      8|
## |octadecylglycerol |         4|  4363.3792| 0.0890976|      1|      8|
## |514150            |         5|   683.7723| 0.0890976|      1|      8|
## |33142             |         5|  2576.8739| 0.0890976|      1|      8|
## |tagatose          |         5|  1852.0894| 0.0934720|      1|      8|
## |behenicacid       |         1| 10527.4058| 0.0980292|      1|      8|
## |377239            |         4|   375.8273| 0.0980292|      1|      8|
## [1] "CS smallest p-values"
## 
## 
## |                         | acrophase|  amplitude|    pvalue|   qvalue|
## |:------------------------|---------:|----------:|---------:|--------:|
## |370221                   | 3.9051854|  5172.0421| 0.0067636| 0.998439|
## |124996                   | 7.3738910|  4181.9797| 0.0081907| 0.998439|
## |arachidicacid            | 7.4984513|  4955.6173| 0.0151275| 0.998439|
## |1-monopalmitin           | 7.0593182|   552.2899| 0.0168864| 0.998439|
## |381422                   | 7.1660103| 11117.5118| 0.0344256| 0.998439|
## |stearicacid              | 0.4797160| 56125.5160| 0.0402616| 0.998439|
## |7490                     | 4.3189010|  8350.8596| 0.0429932| 0.998439|
## |146585                   | 0.5840764|   443.5667| 0.0437199| 0.998439|
## |octadecylglycerol        | 3.4987406|  5629.1701| 0.0558883| 0.998439|
## |376823                   | 3.9093869|  1123.3018| 0.0560193| 0.998439|
## |241383                   | 6.1700670|   478.3861| 0.0584504| 0.998439|
## |62409                    | 0.3126371|   624.9538| 0.0586469| 0.998439|
## |437830                   | 4.4856342|   680.3493| 0.0597446| 0.998439|
## |sedoheptulose7-phosphate | 1.3439412|  3123.1768| 0.0749164| 0.998439|
## |cysteine                 | 4.0517487|  2430.3404| 0.0754800| 0.998439|
## |592429                   | 6.4055609|   641.6954| 0.0812641| 0.998439|
## |84223                    | 6.3417223|  2294.2173| 0.0821751| 0.998439|
## |117742                   | 3.8915828| 39183.3414| 0.0826896| 0.998439|
## |104663                   | 7.9528858|   184.7098| 0.0829994| 0.998439|
## |223087                   | 4.9774080|  5300.4819| 0.0842956| 0.998439|
## [1] "LS smallest p-values"
## 
## 
## |                         | acrophase|  amplitude|    pvalue| qvalue| period|
## |:------------------------|---------:|----------:|---------:|------:|------:|
## |370221                   |  3.836196|  17052.433| 0.3900235|      1|      8|
## |124996                   |  4.972816|  34052.822| 0.4406953|      1|      8|
## |arachidicacid            |  6.067523|  26476.904| 0.6268224|      1|      8|
## |1-monopalmitin           |  7.977545|   3023.194| 0.6622980|      1|      8|
## |381422                   |  7.791549| 144606.156| 0.8722862|      1|      8|
## |stearicacid              |  2.526317| 702474.810| 0.9072095|      1|      8|
## |7490                     |  3.996268|  49491.449| 0.9200826|      1|      8|
## |146585                   |  4.733638|   5374.678| 0.9231950|      1|      8|
## |octadecylglycerol        |  5.549911|  42339.363| 0.9605265|      1|      8|
## |376823                   |  4.255625|  13469.646| 0.9608087|      1|      8|
## |241383                   |  6.441958|   4132.071| 0.9656985|      1|      8|
## |62409                    |  0.000081|  14284.029| 0.9660664|      1|      8|
## |437830                   |  4.019449|  10079.288| 0.9680497|      1|      8|
## |sedoheptulose7-phosphate |  2.004631|  16245.052| 0.9861533|      1|      8|
## |cysteine                 |  5.999921|  13611.417| 0.9865789|      1|      8|
## |592429                   |  7.966204|   3850.129| 0.9902655|      1|      8|
## |84223                    |  5.293376|  33372.930| 0.9907468|      1|      8|
## |117742                   |  2.350027| 636833.342| 0.9910082|      1|      8|
## |104663                   |  6.084911|   3769.620| 0.9911621|      1|      8|
## |223087                   |  5.999919|  27989.679| 0.9917782|      1|      8|

## [1] "JTK smallest p-values"
## 
## 
## |             | acrophase|  amplitude|    pvalue|    qvalue| period|
## |:------------|---------:|----------:|---------:|---------:|------:|
## |342000       |         6|  1537.9572| 0.0001625| 0.0510576|     12|
## |479          |         6|  3672.7126| 0.0001773| 0.0510576|     12|
## |levoglucosan |         1|  4339.1608| 0.0006694| 0.1285277|     12|
## |520873       |         1|  1731.7045| 0.0019543| 0.2606293|     12|
## |344945       |         4|  1951.9683| 0.0022624| 0.2606293|     12|
## |65017        |         1|  1799.5868| 0.0037287| 0.2878709|     12|
## |120562       |         6|  2916.6387| 0.0039982| 0.2878709|     12|
## |18256        |         6|   830.4969| 0.0039982| 0.2878709|     12|
## |210297       |         6| 10310.6775| 0.0052647| 0.3369400|     12|
## |124996       |         6|  3812.3662| 0.0068893| 0.3968211|     12|
## |406851       |         2|   806.1017| 0.0083949| 0.4395898|     12|
## |4550         |         5|  5853.4299| 0.0108685| 0.5216871|     12|
## |408463       |         5| 18336.6930| 0.0148832| 0.6079248|     12|
## |354256       |        11|   767.2109| 0.0148832| 0.6079248|     12|
## |67160        |         4|  3301.4816| 0.0158314| 0.6079248|     12|
## |356988       |         0|   193.0402| 0.0196029| 0.6861152|     12|
## |371565       |         5|   322.2639| 0.0214411| 0.6861152|     12|
## |323785       |         1|  3006.9716| 0.0214411| 0.6861152|     12|
## |125882       |         6|  3904.9972| 0.0256091| 0.7763611|     12|
## |599196       |        10|  2869.4393| 0.0304890| 0.8166641|     12|
## [1] "CS smallest p-values"
## 
## 
## |             |  acrophase|  amplitude|    pvalue|    qvalue|
## |:------------|----------:|----------:|---------:|---------:|
## |levoglucosan | 11.8699892|  4694.8321| 0.0000693| 0.0347211|
## |520873       |  0.2889131|  2407.4098| 0.0001591| 0.0347211|
## |342000       |  5.7164341|  1811.6613| 0.0001808| 0.0347211|
## |479          |  5.1841295|  5058.9617| 0.0012251| 0.1527624|
## |67160        |  3.9890233|  4350.9677| 0.0014589| 0.1527624|
## |323785       |  0.0748233|  3815.9698| 0.0017362| 0.1527624|
## |18256        |  6.2729662|   950.2516| 0.0018565| 0.1527624|
## |210297       |  5.0591104| 13937.9567| 0.0031662| 0.2279692|
## |354256       | 10.7439736|  1002.4332| 0.0038134| 0.2440548|
## |408463       |  5.1051958| 23828.7419| 0.0043980| 0.2475575|
## |4550         |  4.7814818|  8125.5672| 0.0049785| 0.2475575|
## |344945       |  4.2467268|  2619.4946| 0.0053993| 0.2475575|
## |406851       |  0.6637997|  1073.3918| 0.0058884| 0.2475575|
## |120562       |  5.4543857|  3003.3961| 0.0060170| 0.2475575|
## |124996       |  5.2247746|  4201.6119| 0.0077877| 0.2990460|
## |17174        |  4.5219686|   322.0574| 0.0093348| 0.3360530|
## |371565       |  4.6520692|   406.6160| 0.0114549| 0.3881181|
## |599196       |  9.0630890|  5124.5421| 0.0124900| 0.3996789|
## |26736        |  3.5547729|   433.4540| 0.0142873| 0.4331297|
## |shikimicacid |  0.6910786| 10084.1749| 0.0156094| 0.4495499|
## [1] "LS smallest p-values"
## 
## 
## |             |  acrophase|  amplitude|    pvalue| qvalue| period|
## |:------------|----------:|----------:|---------:|------:|------:|
## |levoglucosan | 11.9033700|  15216.248| 0.0152378|      1|     12|
## |520873       |  0.1568281|   9366.124| 0.0270008|      1|     12|
## |342000       |  6.0058638|  11862.473| 0.0295384|      1|     12|
## |479          |  5.5309696|  45922.650| 0.1169757|      1|     12|
## |67160        |  3.8996415|  28185.022| 0.1328460|      1|     12|
## |323785       |  0.1071321|  22223.244| 0.1507641|      1|     12|
## |18256        |  5.0182714|   5940.656| 0.1582710|      1|     12|
## |210297       |  5.4969316|  78801.124| 0.2321884|      1|     12|
## |354256       | 10.1802636|   5659.961| 0.2646486|      1|     12|
## |408463       |  5.0274038| 158332.209| 0.2921860|      1|     12|
## |4550         |  5.9301666|  80981.837| 0.3180716|      1|     12|
## |344945       |  3.9858758|  20746.174| 0.3360124|      1|     12|
## |406851       |  0.4693507|   6354.641| 0.3560696|      1|     12|
## |120562       |  6.0492436|  46986.356| 0.3612112|      1|     12|
## |124996       |  4.9728157|  34052.822| 0.4269268|      1|     12|
## |17174        |  6.1775070|   3061.450| 0.4776648|      1|     12|
## |371565       |  4.6581113|   3328.086| 0.5388989|      1|     12|
## |599196       |  8.5009032|  33638.456| 0.5658010|      1|     12|
## |26736        |  2.9261505|   2774.836| 0.6084689|      1|     12|
## |shikimicacid |  0.3409416|  32940.743| 0.6369236|      1|     12|

## [1] "JTK smallest p-values"
## 
## 
## |              | acrophase|  amplitude|    pvalue|   qvalue| period|
## |:-------------|---------:|----------:|---------:|--------:|------:|
## |43734         |        14|  1716.3249| 0.0016962| 0.976985|     24|
## |366008        |        14|  4140.4638| 0.0060345| 1.000000|     24|
## |117260        |         5|  1710.6681| 0.0060345| 1.000000|     24|
## |14730         |        22|   674.7566| 0.0098352| 1.000000|     24|
## |tagatose      |         2|  3924.0891| 0.0246771| 1.000000|     24|
## |527023        |        23|   393.1514| 0.0307146| 1.000000|     24|
## |109995        |        13|  3879.3646| 0.0403876| 1.000000|     24|
## |phenylalanine |        12|  4123.8467| 0.0428822| 1.000000|     24|
## |167348        |        12| 26170.9059| 0.0455145| 1.000000|     24|
## |342717        |        11| 64347.4242| 0.0512183| 1.000000|     24|
## |aconiticacid  |         1|  2316.1283| 0.0609779| 1.000000|     24|
## |31764         |         4|   374.2363| 0.0609779| 1.000000|     24|
## |599103        |        14|  1676.5502| 0.0683754| 1.000000|     24|
## |371544        |        13|   183.4942| 0.0703706| 1.000000|     24|
## |371546        |        15|  5088.3404| 0.0765623| 1.000000|     24|
## |210279        |        16|  5683.7243| 0.0856093| 1.000000|     24|
## |42424         |        13|   888.8332| 0.0955922| 1.000000|     24|
## |18256         |        22|   593.0858| 0.0955922| 1.000000|     24|
## |553492        |        21|  1392.6468| 0.1251859| 1.000000|     24|
## |117199        |        13|   968.3827| 0.1355512| 1.000000|     24|
## [1] "CS smallest p-values"
## 
## 
## |                |  acrophase|  amplitude|    pvalue|    qvalue|
## |:---------------|----------:|----------:|---------:|---------:|
## |117260          |  3.3158463|  1932.3448| 0.0016905| 0.9382886|
## |14730           | 21.6099181|   952.3756| 0.0089360| 0.9382886|
## |210279          | 16.1174214|  6440.8457| 0.0108190| 0.9382886|
## |43734           | 12.4246169|  4024.3865| 0.0178321| 0.9382886|
## |534527          |  0.1431518|  3110.1694| 0.0193303| 0.9382886|
## |366008          | 13.4501149|  8322.8602| 0.0227516| 0.9382886|
## |167348          | 11.9272357| 25860.4693| 0.0242307| 0.9382886|
## |aconiticacid    | 23.4642136|  2838.7311| 0.0280865| 0.9382886|
## |599103          | 14.4021750|  2605.8821| 0.0294202| 0.9382886|
## |125897          | 18.6349454| 14302.9456| 0.0308738| 0.9382886|
## |109995          | 12.9572189|  4670.8087| 0.0316128| 0.9382886|
## |527023          | 22.4883886|   601.1685| 0.0322592| 0.9382886|
## |42424           | 12.8013080|   896.1066| 0.0332183| 0.9382886|
## |pantothenicacid | 17.9197980|   932.6786| 0.0333281| 0.9382886|
## |18488           | 22.7904955|  1139.8055| 0.0337924| 0.9382886|
## |342717          | 10.5162057| 84193.8364| 0.0363617| 0.9382886|
## |butane-2,3-diol | 14.3667083| 14235.3941| 0.0375959| 0.9382886|
## |133612          | 14.3977927|  2939.9010| 0.0384373| 0.9382886|
## |351222          | 19.0491750|   433.2302| 0.0393235| 0.9382886|
## |371271          | 10.9620388|  6437.3416| 0.0399113| 0.9382886|
## [1] "LS smallest p-values"
## 
## 
## |                | acrophase|  amplitude|    pvalue| qvalue| period|
## |:---------------|---------:|----------:|---------:|------:|------:|
## |117260          |  4.752231|  11902.651| 0.1478743|      1|     24|
## |14730           |  4.158996|   5955.829| 0.4651185|      1|     24|
## |210279          | 14.656897|  42281.479| 0.5214415|      1|     24|
## |43734           | 12.118934|  13510.162| 0.6798630|      1|     24|
## |534527          | 21.999959|  24511.592| 0.7057330|      1|     24|
## |366008          | 12.193984|  40916.270| 0.7569145|      1|     24|
## |167348          | 10.600262| 390683.465| 0.7760834|      1|     24|
## |aconiticacid    |  4.027791|  14498.919| 0.8190669|      1|     24|
## |599103          | 12.407606|  20349.607| 0.8318830|      1|     24|
## |125897          | 21.999947|  67547.789| 0.8448001|      1|     24|
## |109995          | 12.079811|  41261.316| 0.8509748|      1|     24|
## |527023          |  0.000081|   3942.499| 0.8561712|      1|     24|
## |42424           | 12.442864|  11729.814| 0.8635451|      1|     24|
## |pantothenicacid | 16.962025|  11768.946| 0.8643650|      1|     24|
## |18488           | 19.768860|   7227.517| 0.8677751|      1|     24|
## |342717          | 13.808775| 595702.748| 0.8851384|      1|     24|
## |butane-2,3-diol | 14.238654| 143369.445| 0.8926424|      1|     24|
## |133612          | 12.545836|  22364.073| 0.8974732|      1|     24|
## |351222          | 14.142649|   5020.000| 0.9023248|      1|     24|
## |371271          | 13.798721|  39220.912| 0.9054148|      1|     24|

## [1] "JTK smallest p-values"
## 
## 
## |                   | acrophase|    amplitude|    pvalue| qvalue| period|
## |:------------------|---------:|------------:|---------:|------:|------:|
## |43734              |         7|   1765.64563| 0.0072457|      1|      8|
## |414391             |         7|     86.62058| 0.0221596|      1|      8|
## |378996             |         3|   5040.96424| 0.0241219|      1|      8|
## |17537              |         7|    514.06663| 0.0336532|      1|      8|
## |4986               |         3|   2227.03281| 0.0374997|      1|      8|
## |474135             |         3| 108358.28059| 0.0488579|      1|      8|
## |130717             |         1|    850.29590| 0.0488579|      1|      8|
## |18156              |         6|   8271.02802| 0.0541837|      1|      8|
## |3-phosphoglycerate |         3|    863.37738| 0.0647473|      1|      8|
## |412156             |         4|    178.36769| 0.0849004|      1|      8|
## |224193             |         2|    801.32876| 0.0890976|      1|      8|
## |67160              |         2|   2743.92786| 0.0890976|      1|      8|
## |377510             |         2|    429.92092| 0.0934720|      1|      8|
## |glucose            |         0| 154972.35059| 0.0980292|      1|      8|
## |88910              |         0|    240.94664| 0.0980292|      1|      8|
## |42525              |         1|    982.17132| 0.0980292|      1|      8|
## |1867               |         2|    980.75711| 0.1027755|      1|      8|
## |371541             |         4|    181.72644| 0.1128593|      1|      8|
## |panose             |         5|   2923.53299| 0.1182094|      1|      8|
## |163829             |         6|   6246.58130| 0.1182094|      1|      8|
## [1] "CS smallest p-values"
## 
## 
## |            | acrophase|   amplitude|    pvalue|    qvalue|
## |:-----------|---------:|-----------:|---------:|---------:|
## |414391      | 5.9767902|    123.4372| 0.0029145| 0.9940224|
## |378996      | 2.7536783|   5368.5687| 0.0128314| 0.9940224|
## |18156       | 5.4758140|   8637.4167| 0.0150678| 0.9940224|
## |maltotriose | 4.7494327|   8256.2632| 0.0227291| 0.9940224|
## |357049      | 5.4301311|    417.3601| 0.0253755| 0.9940224|
## |43734       | 6.6763914|   1599.1417| 0.0387727| 0.9940224|
## |474135      | 2.2423898| 115833.6303| 0.0406550| 0.9940224|
## |14730       | 4.7064387|    539.8122| 0.0434311| 0.9940224|
## |130717      | 0.5647406|   1028.1095| 0.0456900| 0.9940224|
## |412156      | 3.5286644|    189.6824| 0.0506737| 0.9940224|
## |399721      | 0.3537437|   1595.3000| 0.0555726| 0.9940224|
## |553492      | 7.3368022|   2308.5689| 0.0571540| 0.9940224|
## |224193      | 1.2891386|    883.1947| 0.0592437| 0.9940224|
## |417938      | 5.8673621|   1159.6198| 0.0611792| 0.9940224|
## |321064      | 1.5088184|   1915.7061| 0.0632079| 0.9940224|
## |panose      | 4.6848376|   3604.6833| 0.0660400| 0.9940224|
## |maltose     | 4.8933677| 197883.0402| 0.0666995| 0.9940224|
## |67160       | 1.8646168|   4173.3615| 0.0708479| 0.9940224|
## |17537       | 6.4713920|    525.5688| 0.0759341| 0.9940224|
## |1867        | 2.0357256|   1569.8263| 0.0776546| 0.9940224|
## [1] "LS smallest p-values"
## 
## 
## |            | acrophase|    amplitude|    pvalue| qvalue| period|
## |:-----------|---------:|------------:|---------:|------:|------:|
## |414391      | 5.9425665|     993.1262| 0.2189239|      1|      8|
## |378996      | 4.1321814|   29471.7708| 0.5742854|      1|      8|
## |18156       | 5.9999190|   30496.2726| 0.6255495|      1|      8|
## |maltotriose | 3.9280225|   61393.9005| 0.7566112|      1|      8|
## |357049      | 5.7620125|    3135.0140| 0.7898433|      1|      8|
## |43734       | 0.3413329|    7404.6612| 0.8993369|      1|      8|
## |474135      | 7.8908053|  692739.8941| 0.9091848|      1|      8|
## |14730       | 5.6060401|    5046.5905| 0.9219729|      1|      8|
## |130717      | 0.0000810|    7920.0060| 0.9310361|      1|      8|
## |412156      | 3.5975493|    1645.1476| 0.9474858|      1|      8|
## |399721      | 0.0550369|    6594.7680| 0.9598378|      1|      8|
## |553492      | 7.9691891|   19310.7994| 0.9631716|      1|      8|
## |224193      | 6.9652892|   10602.2931| 0.9671593|      1|      8|
## |417938      | 3.8655381|    8081.5891| 0.9704694|      1|      8|
## |321064      | 1.2834946|   17690.2070| 0.9735841|      1|      8|
## |panose      | 3.9585282|   26298.3980| 0.9773953|      1|      8|
## |maltose     | 3.9329157| 1406448.9494| 0.9782016|      1|      8|
## |67160       | 2.7735971|   33560.2517| 0.9826596|      1|      8|
## |17537       | 3.9823922|    4665.5242| 0.9869124|      1|      8|
## |1867        | 7.8875403|   13926.9362| 0.9881034|      1|      8|

## [1] "JTK smallest p-values"
## 
## 
## |             | acrophase|  amplitude|    pvalue|    qvalue| period|
## |:------------|---------:|----------:|---------:|---------:|------:|
## |17267        |         0|  1177.6863| 0.0019543| 0.9328825|     12|
## |84925        |         5|  1751.1499| 0.0032392| 0.9328825|     12|
## |84388        |         1|   628.9715| 0.0073613| 1.0000000|     12|
## |376823       |        11|  1216.2237| 0.0115824| 1.0000000|     12|
## |4550         |         0|  8497.3022| 0.0214411| 1.0000000|     12|
## |65238        |         1|  1305.3191| 0.0271518| 1.0000000|     12|
## |345436       |        11|  1076.5701| 0.0322911| 1.0000000|     12|
## |553471       |         2|  1217.2843| 0.0341877| 1.0000000|     12|
## |371565       |         1|   281.2517| 0.0341877| 1.0000000|     12|
## |408463       |         1| 28466.3512| 0.0452394| 1.0000000|     12|
## |350847       |         8|  1582.5050| 0.0504798| 1.0000000|     12|
## |aconiticacid |         6|  1044.3967| 0.0532958| 1.0000000|     12|
## |maltotriose  |         1|  5306.8364| 0.0659943| 1.0000000|     12|
## |379063       |         1|   902.9754| 0.0659943| 1.0000000|     12|
## |106387       |         5|  1169.2011| 0.0771909| 1.0000000|     12|
## |26736        |        11|   364.5135| 0.0971209| 1.0000000|     12|
## |myo-inositol |         5| 11829.7197| 0.1046532| 1.0000000|     12|
## |levoglucosan |        10|  1050.7607| 0.1046532| 1.0000000|     12|
## |3208         |         5|  2599.5013| 0.1046532| 1.0000000|     12|
## |356984       |        11|   465.6298| 0.1099711| 1.0000000|     12|
## [1] "CS smallest p-values"
## 
## 
## |                        |  acrophase|  amplitude|    pvalue|    qvalue|
## |:-----------------------|----------:|----------:|---------:|---------:|
## |17267                   | 11.4722332|  1411.0548| 0.0039041| 0.9977994|
## |553471                  |  1.0874765|  1855.5290| 0.0060531| 0.9977994|
## |84388                   |  0.7860730|  1052.6835| 0.0069583| 0.9977994|
## |84925                   |  4.4003871|  1756.7976| 0.0078605| 0.9977994|
## |350847                  |  7.2942078|  1811.1245| 0.0129270| 0.9977994|
## |4550                    | 11.5959793|  8147.9701| 0.0155707| 0.9977994|
## |376823                  | 10.6341620|  1768.4739| 0.0158644| 0.9977994|
## |408463                  |  0.7066031| 26036.7106| 0.0246791| 0.9977994|
## |379063                  |  0.3717935|   963.2783| 0.0269801| 0.9977994|
## |135260                  | 11.4344147|   285.3809| 0.0356304| 0.9977994|
## |344945                  | 11.7260831|  2500.1071| 0.0380043| 0.9977994|
## |aconiticacid            |  4.4452849|  1889.3059| 0.0399161| 0.9977994|
## |65238                   |  0.7257554|  1296.2858| 0.0405108| 0.9977994|
## |UDP-N-acetylglucosamine |  1.6043694|   905.1217| 0.0410323| 0.9977994|
## |21683                   | 11.2022094|  3653.3621| 0.0462387| 0.9977994|
## |345436                  | 10.0417605|   988.5905| 0.0472953| 0.9977994|
## |356984                  | 10.6923174|   499.1233| 0.0509031| 0.9977994|
## |106387                  |  3.9533964|  1788.0115| 0.0592367| 0.9977994|
## |170319                  |  7.3364949|   264.2228| 0.0643052| 0.9977994|
## |mevalonicacid           |  5.0496670|  2971.6523| 0.0658019| 0.9977994|
## [1] "LS smallest p-values"
## 
## 
## |                        |  acrophase|  amplitude|    pvalue| qvalue| period|
## |:-----------------------|----------:|----------:|---------:|------:|------:|
## |17267                   |  0.0010872|   7503.897| 0.2690287|      1|     12|
## |553471                  |  1.2432218|  14826.242| 0.3626454|      1|     12|
## |84388                   |  0.1246645|   6177.392| 0.3972634|      1|     12|
## |84925                   |  2.5315001|  16706.845| 0.4294437|      1|     12|
## |350847                  |  7.7298574|  13761.725| 0.5766293|      1|     12|
## |4550                    |  0.2525746|  76124.801| 0.6361244|      1|     12|
## |376823                  | 10.0555142|  15026.461| 0.6421503|      1|     12|
## |408463                  |  2.1070979| 161868.495| 0.7815804|      1|     12|
## |379063                  |  0.4128332|   7206.079| 0.8076796|      1|     12|
## |135260                  |  0.0831015|   2801.489| 0.8804446|      1|     12|
## |344945                  | 11.9965827|  19837.231| 0.8950148|      1|     12|
## |aconiticacid            |  2.2720770|  12189.792| 0.9054400|      1|     12|
## |65238                   | 11.8559555|   5520.296| 0.9084659|      1|     12|
## |UDP-N-acetylglucosamine |  1.9515692|   7235.823| 0.9110390|      1|     12|
## |21683                   | 10.0995647|  48531.537| 0.9330739|      1|     12|
## |345436                  |  9.9182473|  15597.642| 0.9368301|      1|     12|
## |356984                  | 10.0154513|   4016.482| 0.9481407|      1|     12|
## |106387                  |  2.1118735|   8516.968| 0.9671467|      1|     12|
## |170319                  |  7.9780365|   2431.088| 0.9751308|      1|     12|
## |mevalonicacid           |  4.4689402|  20493.006| 0.9770971|      1|     12|

## [1] "JTK smallest p-values"
## 
## 
## |                         | acrophase|   amplitude|    pvalue| qvalue| period|
## |:------------------------|---------:|-----------:|---------:|------:|------:|
## |gluconicacid             |        16|  7124.63115| 0.0052296|      1|     24|
## |42424                    |        14|  1017.52666| 0.0167899|      1|     24|
## |104179                   |        13|   512.47564| 0.0191184|      1|     24|
## |1-monostearin            |        14|   577.35269| 0.0210632|      1|     24|
## |371543                   |        13|   242.18407| 0.0288698|      1|     24|
## |2813                     |         6| 11252.54376| 0.0336676|      1|     24|
## |2-monoolein              |        16|  7277.71977| 0.0380242|      1|     24|
## |377510                   |        17|   484.01459| 0.0512183|      1|     24|
## |inosine                  |        11| 22312.40093| 0.0543037|      1|     24|
## |396734                   |         5|    98.46462| 0.0609779|      1|     24|
## |371544                   |        13|   202.58609| 0.0645822|      1|     24|
## |1-monopalmitin           |         5|   300.34361| 0.0787680|      1|     24|
## |31224                    |        18|  2944.74619| 0.0809737|      1|     24|
## |sedoheptulose7-phosphate |         4|  1422.52207| 0.0856093|      1|     24|
## |106344                   |         4|   895.90429| 0.0904789|      1|     24|
## |377239                   |        16|   985.88363| 0.0955922|      1|     24|
## |87877                    |        19|  7925.42958| 0.1251859|      1|     24|
## |threitol                 |         4|   306.88434| 0.1285873|      1|     24|
## |95422                    |         6|  6029.85308| 0.1319886|      1|     24|
## |321064                   |        18|  1069.14545| 0.1543818|      1|     24|
## [1] "CS smallest p-values"
## 
## 
## |             | acrophase|   amplitude|    pvalue|    qvalue|
## |:------------|---------:|-----------:|---------:|---------:|
## |gluconicacid | 16.101853|   7979.2000| 0.0014067| 0.8102314|
## |104179       | 13.547928|    815.8729| 0.0094430| 0.9926532|
## |monomyristin |  4.002393|   2518.9207| 0.0109466| 0.9926532|
## |2-monoolein  | 16.436697|   9056.2894| 0.0142306| 0.9926532|
## |2813         |  5.078088|  14597.2954| 0.0142966| 0.9926532|
## |371544       | 12.346177|    219.5221| 0.0146809| 0.9926532|
## |377510       | 15.627716|    778.6221| 0.0159627| 0.9926532|
## |threitol     |  1.838166|    644.0721| 0.0162288| 0.9926532|
## |321064       | 17.152153|   2300.9309| 0.0165599| 0.9926532|
## |377239       | 15.700094|    845.7528| 0.0206774| 0.9926532|
## |95422        |  6.182168|   6516.4834| 0.0267736| 0.9926532|
## |106344       |  4.222153|   2196.7289| 0.0274029| 0.9926532|
## |371543       | 13.674228|    261.2843| 0.0303836| 0.9926532|
## |100934       |  7.325535|  23367.0318| 0.0320148| 0.9926532|
## |31224        | 16.282295|   4866.0530| 0.0322282| 0.9926532|
## |370223       | 13.280774|   5602.4097| 0.0375990| 0.9926532|
## |474135       | 15.816721| 115296.8099| 0.0419688| 0.9926532|
## |371541       | 14.362243|    287.8903| 0.0426271| 0.9926532|
## |380694       |  3.939889|   7761.5392| 0.0428202| 0.9926532|
## |1867         | 16.367643|   1716.1183| 0.0455169| 0.9926532|
## [1] "LS smallest p-values"
## 
## 
## |             |  acrophase|  amplitude|    pvalue| qvalue| period|
## |:------------|----------:|----------:|---------:|------:|------:|
## |gluconicacid | 18.0582556|  52416.204| 0.1293658|      1|     24|
## |104179       | 12.0973098|   5941.107| 0.4810089|      1|     24|
## |monomyristin |  4.3092512|  10946.642| 0.5250035|      1|     24|
## |2-monoolein  | 16.4724804|  50108.728| 0.6071973|      1|     24|
## |2813         |  3.1658613|  68065.603| 0.6086775|      1|     24|
## |371544       | 12.0546412|   2017.428| 0.6171856|      1|     24|
## |377510       | 15.4800056|   6494.377| 0.6441437|      1|     24|
## |threitol     |  0.0000418|   5421.126| 0.6494774|      1|     24|
## |321064       | 17.2834946|  17690.207| 0.6559967|      1|     24|
## |377239       | 15.7559716|   6153.795| 0.7271154|      1|     24|
## |95422        |  5.9685883|  39703.295| 0.8054749|      1|     24|
## |106344       |  4.2334304|   9028.241| 0.8121155|      1|     24|
## |371543       | 12.5020046|   1684.958| 0.8405606|      1|     24|
## |100934       |  6.0517059| 196920.227| 0.8542287|      1|     24|
## |31224        | 12.1498431|  31747.972| 0.8559268|      1|     24|
## |370223       | 12.1826094| 140848.109| 0.8926606|      1|     24|
## |474135       | 15.8908053| 692739.894| 0.9154795|      1|     24|
## |371541       | 13.3354616|   2090.286| 0.9184671|      1|     24|
## |380694       |  2.8701776|  22726.392| 0.9193231|      1|     24|
## |1867         | 15.8875403|  13926.936| 0.9303806|      1|     24|

## [1] "JTK smallest p-values"
## 
## 
## |                       | acrophase|  amplitude|    pvalue| qvalue| period|
## |:----------------------|---------:|----------:|---------:|------:|------:|
## |342949                 |         7|   813.7031| 0.0059732|      1|      8|
## |65238                  |         3|  1253.3468| 0.0067965|      1|      8|
## |390130                 |         4|   822.5420| 0.0087595|      1|      8|
## |17537                  |         3|   408.7077| 0.0105542|      1|      8|
## |384970                 |         5|   320.6729| 0.0126747|      1|      8|
## |zymostenol             |         5|   308.6521| 0.0142941|      1|      8|
## |217691                 |         3| 16318.6103| 0.0170728|      1|      8|
## |357049                 |         4|   693.8485| 0.0203260|      1|      8|
## |3-hydroxypropionicacid |         3| 13615.3411| 0.0301596|      1|      8|
## |474021                 |         4|   280.7214| 0.0310119|      1|      8|
## |187871                 |         4|   417.9001| 0.0417286|      1|      8|
## |18488                  |         3|   835.2699| 0.0417286|      1|      8|
## |210229                 |         0|   777.4639| 0.0463712|      1|      8|
## |404049                 |         5|   208.5965| 0.0514606|      1|      8|
## |33142                  |         4| 11581.3484| 0.0541837|      1|      8|
## |indole-3-acetate       |         4|   494.2676| 0.0663730|      1|      8|
## |327608                 |         4|   163.3417| 0.0715414|      1|      8|
## |125897                 |         4| 12298.7082| 0.0770142|      1|      8|
## |62409                  |         4|   669.4533| 0.0770142|      1|      8|
## |20330                  |         4|  1088.2373| 0.0770142|      1|      8|
## [1] "CS smallest p-values"
## 
## 
## |                       | acrophase|   amplitude|    pvalue|    qvalue|
## |:----------------------|---------:|-----------:|---------:|---------:|
## |65238                  | 2.1229636|   1684.8092| 0.0015241| 0.8778818|
## |210229                 | 7.1350553|    823.1615| 0.0128644| 0.9993075|
## |384970                 | 3.8101911|    554.9046| 0.0130077| 0.9993075|
## |indole-3-acetate       | 3.4075714|    441.8476| 0.0135950| 0.9993075|
## |217691                 | 2.4311656|  26182.5298| 0.0139212| 0.9993075|
## |342949                 | 6.2700075|    935.9669| 0.0145556| 0.9993075|
## |glucose                | 1.3173563| 176825.0157| 0.0179470| 0.9993075|
## |3-hydroxypropionicacid | 2.3944136|  22860.8099| 0.0189182| 0.9993075|
## |117998                 | 3.6684983|   6433.3212| 0.0191424| 0.9993075|
## |474021                 | 3.4369101|    334.4246| 0.0238446| 0.9993075|
## |62840                  | 3.7017005|   9809.3585| 0.0315729| 0.9993075|
## |18488                  | 2.4623158|    968.3002| 0.0340791| 0.9993075|
## |224095                 | 6.1130993|   1655.6526| 0.0361628| 0.9993075|
## |390130                 | 3.4669219|    968.7123| 0.0400884| 0.9993075|
## |404049                 | 4.0349695|    374.7663| 0.0419526| 0.9993075|
## |3232                   | 0.7195349|  10138.8524| 0.0449047| 0.9993075|
## |327608                 | 3.9607561|    214.9771| 0.0498798| 0.9993075|
## |17537                  | 2.3956932|    511.5029| 0.0505625| 0.9993075|
## |levoglucosan           | 0.4128067|   2659.6944| 0.0572881| 0.9993075|
## |62409                  | 3.1254274|   1058.0707| 0.0584672| 0.9993075|
## [1] "LS smallest p-values"
## 
## 
## |                       | acrophase|   amplitude|    pvalue| qvalue| period|
## |:----------------------|---------:|-----------:|---------:|------:|------:|
## |65238                  | 0.0000810|    7359.182| 0.1371420|      1|      8|
## |210229                 | 1.7530498|    3610.457| 0.5750968|      1|      8|
## |384970                 | 3.1003397|    6021.787| 0.5785948|      1|      8|
## |indole-3-acetate       | 0.0000810|    3210.116| 0.5926076|      1|      8|
## |217691                 | 3.5289837|   97460.699| 0.6001674|      1|      8|
## |342949                 | 6.1238296|    6425.839| 0.6144344|      1|      8|
## |glucose                | 7.8534368| 3098740.479| 0.6819300|      1|      8|
## |3-hydroxypropionicacid | 4.0104111|   94252.617| 0.6988460|      1|      8|
## |117998                 | 0.6369239|   43853.149| 0.7026137|      1|      8|
## |474021                 | 7.8672537|    4448.395| 0.7712369|      1|      8|
## |62840                  | 6.0284094|   80416.187| 0.8506479|      1|      8|
## |18488                  | 1.9932550|    7111.183| 0.8698372|      1|      8|
## |224095                 | 3.9290753|    4587.224| 0.8838802|      1|      8|
## |390130                 | 6.0479584|    9183.418| 0.9063269|      1|      8|
## |404049                 | 3.9509923|    3099.251| 0.9154042|      1|      8|
## |3232                   | 7.9273356|   40515.211| 0.9280115|      1|      8|
## |327608                 | 3.6064490|    1943.625| 0.9451552|      1|      8|
## |17537                  | 2.0928291|    4898.454| 0.9471655|      1|      8|
## |levoglucosan           | 1.6394268|   10481.561| 0.9634413|      1|      8|
## |62409                  | 6.3123610|   12988.252| 0.9657302|      1|      8|

## [1] "JTK smallest p-values"
## 
## 
## |                       | acrophase|   amplitude|    pvalue| qvalue| period|
## |:----------------------|---------:|-----------:|---------:|------:|------:|
## |1-kestose              |        10|  5649.78318| 0.0030173|      1|     12|
## |574694                 |         5|   337.82026| 0.0056341|      1|     12|
## |33142                  |         3| 13675.79870| 0.0101948|      1|     12|
## |inosine5-monophosphate |        11|   900.14693| 0.0178931|      1|     12|
## |monomyristin           |         7|   927.37054| 0.0304890|      1|     12|
## |tocopherolalpha-       |         5|   185.26198| 0.0404868|      1|     12|
## |351039                 |        11|  2755.94868| 0.0404868|      1|     12|
## |210297                 |         4| 11195.62167| 0.0404868|      1|     12|
## |16747                  |         5|  4593.01210| 0.0404868|      1|     12|
## |17822                  |         3|  6392.95241| 0.0532958|      1|     12|
## |glucose-1-phosphate    |         7|  1660.64028| 0.0577981|      1|     12|
## |380205                 |         9|   788.77761| 0.0593467|      1|     12|
## |377499                 |         3|   453.60900| 0.0732869|      1|     12|
## |arachidicacid          |         9|  2701.85501| 0.0771909|      1|     12|
## |31764                  |         3|  1197.83889| 0.0771909|      1|     12|
## |threitol               |         4|  1132.78506| 0.0855476|      1|     12|
## |tagatose               |         4|  8296.83742| 0.0855476|      1|     12|
## |380694                 |         7|  2359.61533| 0.0855476|      1|     12|
## |396734                 |         5|    98.46462| 0.0900142|      1|     12|
## |384970                 |        11|   388.90873| 0.0900142|      1|     12|
## [1] "CS smallest p-values"
## 
## 
## |                       | acrophase|  amplitude|    pvalue|    qvalue|
## |:----------------------|---------:|----------:|---------:|---------:|
## |1-kestose              |  8.831025|  6803.6212| 0.0013484| 0.7766921|
## |33142                  |  3.123234| 20417.0351| 0.0028448| 0.8193149|
## |574694                 |  3.669047|   346.9884| 0.0072081| 0.9978088|
## |146430                 |  0.133065|  1471.0273| 0.0129025| 0.9978088|
## |monomyristin           |  7.413849|  1556.3060| 0.0144398| 0.9978088|
## |tocopherolalpha-       |  3.786312|   197.4639| 0.0220730| 0.9978088|
## |threitol               |  3.572839|  1264.9020| 0.0220742| 0.9978088|
## |187855                 |  9.835591|   914.0932| 0.0259425| 0.9978088|
## |phenol                 | 10.473340|   811.8266| 0.0274826| 0.9978088|
## |351382                 |  9.476831|  4332.6468| 0.0295429| 0.9978088|
## |351039                 |  9.978655|  4733.4206| 0.0296538| 0.9978088|
## |396734                 |  3.696544|   155.3105| 0.0301874| 0.9978088|
## |210297                 |  3.242179| 11623.6233| 0.0358363| 0.9978088|
## |inosine5-monophosphate |  9.917336|  1294.2955| 0.0365097| 0.9978088|
## |tagatose               |  3.479607|  8155.9157| 0.0379155| 0.9978088|
## |tetracosanol           | 10.700610|   307.8580| 0.0391997| 0.9978088|
## |223108                 |  9.791170|   975.8067| 0.0398224| 0.9978088|
## |384970                 |  9.845686|   481.5084| 0.0412102| 0.9978088|
## |glucose-1-phosphate    |  6.479270|  1960.7260| 0.0440687| 0.9978088|
## |67160                  |  5.092904|  4607.1118| 0.0454684| 0.9978088|
## [1] "LS smallest p-values"
## 
## 
## |                       | acrophase| amplitude|    pvalue| qvalue| period|
## |:----------------------|---------:|---------:|---------:|------:|------:|
## |1-kestose              |  7.998764| 32063.840| 0.1254429|      1|     12|
## |33142                  |  4.695473| 82057.334| 0.2151807|      1|     12|
## |574694                 |  3.332257|  2603.515| 0.4063947|      1|     12|
## |146430                 | 10.868676|  7157.505| 0.5760298|      1|     12|
## |monomyristin           |  8.094725|  7227.999| 0.6118720|      1|     12|
## |tocopherolalpha-       |  3.779356|  1934.941| 0.7475582|      1|     12|
## |threitol               |  5.439673|  7503.613| 0.7475742|      1|     12|
## |187855                 |  9.382920|  5607.768| 0.7963329|      1|     12|
## |phenol                 | 10.667561|  8930.881| 0.8129396|      1|     12|
## |351382                 |  8.034932| 21785.759| 0.8330141|      1|     12|
## |351039                 | 10.315704| 24653.055| 0.8340300|      1|     12|
## |396734                 |  3.908351|  1691.005| 0.8388313|      1|     12|
## |210297                 |  1.531069| 58188.299| 0.8817857|      1|     12|
## |inosine5-monophosphate | 10.113036|  9061.608| 0.8860656|      1|     12|
## |tagatose               |  6.049842| 44635.492| 0.8945035|      1|     12|
## |tetracosanol           | 10.128589|  2806.943| 0.9016615|      1|     12|
## |223108                 |  9.640960|  7235.783| 0.9049543|      1|     12|
## |384970                 | 11.100340|  6021.787| 0.9119002|      1|     12|
## |glucose-1-phosphate    |  6.104174| 15098.118| 0.9246455|      1|     12|
## |67160                  |  5.419673| 32043.770| 0.9301955|      1|     12|

## [1] "JTK smallest p-values"
## 
## 
## |                               | acrophase|  amplitude|  pvalue|   qvalue| period|
## |:------------------------------|---------:|----------:|-------:|--------:|------:|
## |phenylalanine                  |        19| 19396.1158| 0.0e+00| 1.00e-07|     24|
## |indole-3-propionicacid         |        19| 18401.5701| 0.0e+00| 2.00e-07|     24|
## |4-hydroxyhippuricacid          |        20|  1394.4146| 0.0e+00| 2.00e-07|     24|
## |tagatose                       |         8| 18570.7454| 0.0e+00| 2.10e-06|     24|
## |isoleucine                     |        19| 45891.9372| 0.0e+00| 2.70e-06|     24|
## |553481                         |         7|  1452.7509| 0.0e+00| 2.70e-06|     24|
## |3-hydroxy-3-methylglutaricacid |        19|   548.0078| 0.0e+00| 2.70e-06|     24|
## |threitol                       |         8|  2390.7280| 0.0e+00| 3.10e-06|     24|
## |leucine                        |        18| 81558.7568| 1.0e-07| 4.70e-06|     24|
## |3-hydroxypropionicacid         |         5| 26655.0972| 1.0e-07| 5.50e-06|     24|
## |133969                         |        19|  4972.3749| 1.0e-07| 6.90e-06|     24|
## |1981                           |         6|  3178.7985| 2.0e-07| 9.80e-06|     24|
## |tryptophan                     |        20| 14549.7827| 4.0e-07| 1.68e-05|     24|
## |217691                         |         5| 28682.7259| 4.0e-07| 1.77e-05|     24|
## |17822                          |         9| 16358.2083| 5.0e-07| 1.86e-05|     24|
## |aconiticacid                   |         8|  7417.0198| 1.1e-06| 4.02e-05|     24|
## |31695                          |        20|   921.3601| 1.8e-06| 6.00e-05|     24|
## |quinicacid                     |         6|  4165.2125| 2.0e-06| 6.36e-05|     24|
## |18256                          |         8|  2211.8300| 2.5e-06| 7.18e-05|     24|
## |14730                          |         8|  2233.9271| 2.5e-06| 7.18e-05|     24|
## [1] "CS smallest p-values"
## 
## 
## |                               | acrophase|  amplitude| pvalue|   qvalue|
## |:------------------------------|---------:|----------:|------:|--------:|
## |tagatose                       |  7.201829| 18083.1050|  0e+00| 0.00e+00|
## |3-hydroxy-3-methylglutaricacid | 18.671580|   548.4649|  0e+00| 1.00e-07|
## |553481                         |  7.593147|  1455.7980|  0e+00| 1.00e-07|
## |phenylalanine                  | 18.510443| 20500.2894|  0e+00| 1.00e-07|
## |1981                           |  5.958649|  3675.2063|  0e+00| 4.00e-07|
## |threitol                       |  6.738376|  2422.3393|  0e+00| 5.00e-07|
## |18256                          |  7.385717|  2111.6032|  0e+00| 1.20e-06|
## |14730                          |  7.431546|  2133.1768|  0e+00| 1.30e-06|
## |indole-3-propionicacid         | 18.852999| 21303.6994|  0e+00| 2.40e-06|
## |aconiticacid                   |  7.264334|  6879.7732|  0e+00| 2.40e-06|
## |isoleucine                     | 18.489847| 46511.0267|  0e+00| 2.40e-06|
## |4-hydroxyhippuricacid          | 19.846292|  1856.4436|  1e-07| 2.40e-06|
## |133969                         | 18.702631|  4588.5502|  1e-07| 2.40e-06|
## |leucine                        | 18.550577| 88866.5386|  1e-07| 4.30e-06|
## |2031                           |  6.037978| 29889.3277|  1e-07| 4.70e-06|
## |tryptophan                     | 19.233061| 15938.6354|  2e-07| 6.20e-06|
## |31695                          | 18.974324|  1057.3473|  4e-07| 1.19e-05|
## |17822                          |  7.758196| 15660.5743|  4e-07| 1.23e-05|
## |163829                         |  5.959888| 29149.1644|  4e-07| 1.28e-05|
## |quinicacid                     |  5.789716|  4643.1234|  6e-07| 1.64e-05|
## [1] "LS smallest p-values"
## 
## 
## |                               | acrophase|  amplitude|    pvalue|    qvalue| period|
## |:------------------------------|---------:|----------:|---------:|---------:|------:|
## |tagatose                       |  6.049842|  44635.492| 0.0000086| 0.0043012|     24|
## |3-hydroxy-3-methylglutaricacid | 18.509994|   1549.453| 0.0000214| 0.0043012|     24|
## |553481                         |  6.145246|   4147.245| 0.0000224| 0.0043012|     24|
## |phenylalanine                  | 18.851962|  85482.672| 0.0000380| 0.0054718|     24|
## |1981                           |  4.841687|   9396.851| 0.0000637| 0.0073354|     24|
## |threitol                       |  5.439673|   7503.613| 0.0000775| 0.0074373|     24|
## |18256                          |  6.085036|   5895.532| 0.0001237| 0.0098943|     24|
## |14730                          |  6.089501|   5910.170| 0.0001374| 0.0098943|     24|
## |indole-3-propionicacid         | 18.613962|  78939.621| 0.0001963| 0.0104774|     24|
## |aconiticacid                   |  6.092528|  16636.970| 0.0002189| 0.0104774|     24|
## |isoleucine                     | 19.118363| 224366.115| 0.0002191| 0.0104774|     24|
## |4-hydroxyhippuricacid          | 21.999919|   4882.263| 0.0002331| 0.0104774|     24|
## |133969                         | 18.692546|   9168.532| 0.0002365| 0.0104774|     24|
## |leucine                        | 19.364185| 433463.742| 0.0003269| 0.0134484|     24|
## |2031                           |  4.506223|  62161.539| 0.0003523| 0.0135278|     24|
## |tryptophan                     | 19.490921|  75462.718| 0.0004209| 0.0151541|     24|
## |31695                          | 21.270865|   5095.172| 0.0006167| 0.0206280|     24|
## |17822                          |  6.086638|  63641.387| 0.0006478| 0.0206280|     24|
## |163829                         |  4.401658|  60653.107| 0.0006804| 0.0206280|     24|
## |quinicacid                     |  4.413963|   9580.964| 0.0008024| 0.0229948|     24|

#Some examples that were found significant.

library(ggplot2)
test %>% filter(trt == "trf") %>% ggplot(aes(y = tagatose, x = time, color = replicate)) + geom_point() + geom_smooth() + ggtitle("trf")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

test %>% filter(trt == "trf") %>% ggplot(aes(y = phenylalanine, x = c_time, color = replicate)) + geom_point() + geom_smooth() + ggtitle("trf")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

test %>% filter(trt == "iso") %>% ggplot(aes(y = levoglucosan , x = c_time, color = replicate)) + geom_point() + geom_smooth() + ggtitle("iso")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

test %>% filter(trt == "iso") %>% ggplot(aes(y = `520873` , x = c_time, color = replicate)) + geom_point() + geom_smooth() + ggtitle("iso")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

test %>% filter(trt == "iso") %>% ggplot(aes(y = `342000` , x = c_time, color = replicate)) + geom_point() + geom_smooth() + ggtitle("iso")
## `geom_smooth()` using method = 'loess' and formula = 'y ~ x'